package com.woniuxy.his.frame;

import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JFrame;

@SuppressWarnings("serial")
public class HisFrame extends JFrame{
	public HisFrame() throws Exception{
		//窗口大小尺寸
		this.setSize(600, 500);
		//获取屏幕尺寸
		Dimension dm = Toolkit.getDefaultToolkit().getScreenSize();
		int width = (int) (dm.getWidth() - 600) / 2;
		int height = (int) (dm.getHeight() - 500) / 2;
		
		
		this.setLocation(width, height);
		//设置窗口标题内容
		this.setTitle("HIS");
		//给予内容面板
//		this.setContentPane(new MyGamePanel());
		//设置窗口可见
		this.setVisible(true);
		//设置关闭窗口结束进程
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		//关闭窗口可变尺寸
//		this.setResizable(false);
	}
	
	public static void main(String[] args) throws Exception {
		new HisFrame();
	}
}
